package methods;

public class cons {
    int x;

    public cons(int y){
        System.out.println("构造MyClass");
        x = y;
    }

    public static void main(String[] args){
        cons myObj = new cons(5);
        System.out.println(myObj.x);
    }
}

/*
构造MyClass
5
 */